package sv.gob.mh.dgii.model;

// Generated Dec 12, 2007 1:25:05 PM by Hibernate Tools 3.2.0.CR1

import java.util.Date;
import javax.persistence.AttributeOverride;
import javax.persistence.AttributeOverrides;
import javax.persistence.Column;
import javax.persistence.EmbeddedId;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.JoinColumns;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 * RcSubImportancia generated by hbm2java
 */
@Entity
@Table(name = "RC_SUB_IMPORTANCIA", schema = "RUC")
public class RcSubImportancia implements java.io.Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1817204290055725889L;
	private RcSubImportanciaId id;
	private TbSubImportancia tbSubImportancia;
	private Date ffsubimportancia;
	private String cusuario;
	private Date fhingreso;

	public RcSubImportancia() {
	}

	public RcSubImportancia(RcSubImportanciaId id,
			TbSubImportancia tbSubImportancia, String cusuario, Date fhingreso) {
		this.id = id;
		this.tbSubImportancia = tbSubImportancia;
		this.cusuario = cusuario;
		this.fhingreso = fhingreso;
	}

	public RcSubImportancia(RcSubImportanciaId id,
			TbSubImportancia tbSubImportancia, Date ffsubimportancia,
			String cusuario, Date fhingreso) {
		this.id = id;
		this.tbSubImportancia = tbSubImportancia;
		this.ffsubimportancia = ffsubimportancia;
		this.cusuario = cusuario;
		this.fhingreso = fhingreso;
	}

	@EmbeddedId
	@AttributeOverrides( {
			@AttributeOverride(name = "nit", column = @Column(name = "NIT", nullable = false, length = 14)),
			@AttributeOverride(name = "fisubimportancia", column = @Column(name = "FI_SUBIMPORTANCIA", nullable = false, length = 7)) })
	public RcSubImportanciaId getId() {
		return this.id;
	}

	public void setId(RcSubImportanciaId id) {
		this.id = id;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumns( {
			@JoinColumn(name = "C_IMPORTANCIA", referencedColumnName = "C_IMPORTANCIA", nullable = false),
			@JoinColumn(name = "C_SUBIMPORTANCIA", referencedColumnName = "C_SUBIMPORTANCIA", nullable = false) })
	public TbSubImportancia getTbSubImportancia() {
		return this.tbSubImportancia;
	}

	public void setTbSubImportancia(TbSubImportancia tbSubImportancia) {
		this.tbSubImportancia = tbSubImportancia;
	}

	@Temporal(TemporalType.DATE)
	@Column(name = "FF_SUBIMPORTANCIA", length = 7)
	public Date getFfsubimportancia() {
		return this.ffsubimportancia;
	}

	public void setFfsubimportancia(Date ffsubimportancia) {
		this.ffsubimportancia = ffsubimportancia;
	}

	@Column(name = "C_USUARIO", nullable = false, length = 30)
	public String getCusuario() {
		return this.cusuario;
	}

	public void setCusuario(String cusuario) {
		this.cusuario = cusuario;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "FH_INGRESO", nullable = false, length = 7)
	public Date getFhingreso() {
		return this.fhingreso;
	}

	public void setFhingreso(Date fhingreso) {
		this.fhingreso = fhingreso;
	}

}
